<?php
class Accountmanager_Model_Removeaccount implements Accountmanager_Model_Mainable{
    
    private $core_controller_notnull;
    
    private $accountmanager_data_delete;
    private $action_handler;
    
    private $actual_result;
    private $excepted_result = 1;
    
    public function __construct() {
        $this->core_controller_notnull = new Core_Controller_Notnull;
    }


    public function main(array $variables = null) {
        $this->core_controller_notnull = new Core_Controller_Notnull;
        $this->core_controller_notnull->main($variables);
        $this->accountmanager_data_delete = new Accountmanager_Data_Delete;
        $this->actual_result = $this->accountmanager_data_delete->main($variables);
        if($this->actual_result = $this->excepted_result){
            session_destroy();
            $this->action_handler = new Accountmanager_Data_Accountmanagerredirect;
            $this->action_handler->main($variables);
        }
        else {
            $this->action_handler = new Accountmanager_Data_Errormessage;
            return $this->action_handler->main($variables);
        }
    }

}
